﻿@model DeJC.DAL.Model.Product

@{
    ViewBag.Title = "Edit";
    Layout="~/Views/Shared/_LayoutConfig.cshtml";
    
}

<h2>Edit</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Product</legend>

        @Html.HiddenFor(model => model.ID)

        <div class="editor-label">
            @Html.LabelFor(model => model.ProductBrandID, "NavBrand")
        </div>
        <div class="editor-field">
            @Html.DropDownList("ProductBrandID", String.Empty)
            @Html.ValidationMessageFor(model => model.ProductBrandID)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.CategoryID, "NavCategory")
        </div>
        <div class="editor-field">
            @Html.DropDownList("CategoryID", String.Empty)
            @Html.ValidationMessageFor(model => model.CategoryID)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.UnitID, "NavUnit")
        </div>
        <div class="editor-field">
            @Html.DropDownList("UnitID", String.Empty)
            @Html.ValidationMessageFor(model => model.UnitID)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Description)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Description)
            @Html.ValidationMessageFor(model => model.Description)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Deleted)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Deleted)
            @Html.ValidationMessageFor(model => model.Deleted)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.DeletedDate)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.DeletedDate)
            @Html.ValidationMessageFor(model => model.DeletedDate)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ImagePathSmall)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ImagePathSmall)
            @Html.ValidationMessageFor(model => model.ImagePathSmall)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ImagePathMedium)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ImagePathMedium)
            @Html.ValidationMessageFor(model => model.ImagePathMedium)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ImagePathLarge)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ImagePathLarge)
            @Html.ValidationMessageFor(model => model.ImagePathLarge)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Size)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Size)
            @Html.ValidationMessageFor(model => model.Size)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Price)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Price)
            @Html.ValidationMessageFor(model => model.Price)
        </div>

        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
